<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
 <head>
  <title>inputEx - Styling descriptions</title>

<!-- YUI CSS -->
<link rel="stylesheet" type="text/css" href="../lib/yui/reset-fonts/reset-fonts.css">
<link rel="stylesheet" type="text/css" href="../lib/yui/container/assets/container.css"> 
<link rel="stylesheet" type="text/css" href="../lib/yui/assets/skins/sam/skin.css">

<!-- InputEx CSS -->
<link type='text/css' rel='stylesheet' href='../css/inputEx.css' />

<!-- Demo CSS -->
<link rel="stylesheet" type="text/css" href="css/demo.css"/>
<link rel="stylesheet" type="text/css" href="css/dpSyntaxHighlighter.css">

 </head>
<body>

<h1>inputEx - Styling descriptions</h1>

<!-- Example 1 -->
<div class='exampleDiv'>
	<h2>Styling the field descriptions</h2>
	<p>You can style the description to appear when the field is focused :</p>
	<div class='demoContainer' id='container1'></div>
	<style>
	#sampleGroup div.inputEx-description { display:none; }
	#sampleGroup div.inputEx-focused div.inputEx-description { display: block; }
	</style>
	<div class='codeContainer'>
		<textarea name="code" class="JScript">
			var descriptedFields = [ 
					{type: 'select', label: 'A select', description: 'Select one', choices: ['One','Two','Three'] },
					{label: 'StringField', description: 'Here is the description', value:'Jacques' },
					{type:'boolean', description: 'Check this box if you are happy to be there', label: 'Happy to be there ?', name: 'email'},
					{ type:'url', description: 'Your blog url', label: 'Website', name:'website'},
					{ type: 'radio', label: 'Radio', description: 'My favorite is YUI', name: 'example1', choices: ['Ajaxian','YUI blog','other']},
					{ type: 'text', label: 'Comments', description: 'Enter your comment'}
			];
			new inputEx.Group({id:'sampleGroup', parentEl: 'container1', fields: descriptedFields, legend: 'User Informations'});
			
			/*
			CSS :
			#sampleGroup div.inputEx-description {
				display:none;
			}
			#sampleGroup div.inputEx-focused div.inputEx-description {
				display: block;
			}
			*/
		</textarea>
	</div>
</div>




<!-- YUI Library -->
<script type="text/javascript" src="../lib/yui/utilities/utilities.js"></script>
<script type="text/javascript" src="../lib/yui/selector/selector-min.js"></script>
<script type="text/javascript" src="../lib/yui/event-delegate/event-delegate-min.js"></script>
<script type="text/javascript" src="../lib/yui/container/container-min.js"></script>
<script type="text/javascript" src="../lib/yui/json/json-min.js"></script>

<!-- InputEx -->
<script src="../js/inputex.js"  type='text/javascript'></script>
<script src="../js/mixins/choice.js"  type='text/javascript'></script>
<script src="../js/Field.js"  type='text/javascript'></script>
<script src="../js/Group.js"  type='text/javascript'></script>
<script src="../js/fields/StringField.js"  type='text/javascript'></script>
<script src="../js/fields/SelectField.js"  type='text/javascript'></script>
<script src="../js/fields/EmailField.js"  type='text/javascript'></script>
<script src="../js/fields/UrlField.js"  type='text/javascript'></script>
<script src="../js/fields/CheckBox.js"  type='text/javascript'></script>
<script src="../js/fields/RadioField.js"  type='text/javascript'></script>
<script src="../js/fields/Textarea.js"  type='text/javascript'></script>

<!-- inputEx examples -->
<script src="js/dpSyntaxHighlighter.js"></script>
<script src="inputex-examples.js"></script>

 </body>
</html>